extends IBasicComponent


class_name MoveElement
"""
可多个叠加的移动行为
"""


## 需要操作的移动组件
@export var move_component: MoveComponent = null


func __check_exports() -> Dictionary:
    return IComponent.merge({
        "move_component": IComponent.find_parent.bind(self, func(x): return x is MoveComponent, move_component),
    }, super.__check_exports())

# MoveComponent就绪时触发
func on_move_ready() -> void:
    pass

# 转向时触发
func on_move_direction_changed() -> void:
    pass

# 迭代加速逻辑,返回附加的速度
func yield_move(delta: float) -> Vector2:
    return Vector2.ZERO
